<template>
  <div class="app-container">
    <div class="top">
      <el-button
        type="primary"
        size="mini"
        class="el-icon-plus add"
        @click="add"
        >新增</el-button
      >
      <el-form inline size="mini" :model="formData">
        <el-form-item>
          <el-input v-model="formData.project" placeholder="请输入免疫项目"></el-input>
        </el-form-item>
        <el-form-item>
          <el-button type="primary">查询</el-button>
        </el-form-item>
      </el-form>
    </div>
    <el-table :data="data" style="width: 100%">
      <el-table-column
        prop="prop"
        label="免疫项目"
        wvalueth="wvalueth"
        align="center"
      >
      </el-table-column>
      <el-table-column
        prop="prop"
        label="免疫类型"
        wvalueth="wvalueth"
        align="center"
      >
      </el-table-column>
      <el-table-column
        prop="prop"
        label="免疫对象"
        wvalueth="wvalueth"
        align="center"
      >
      </el-table-column>
      <el-table-column
        prop="prop"
        label="疫苗明细"
        wvalueth="wvalueth"
        align="center"
      >
      </el-table-column>
      <el-table-column prop="prop" label="操作" wvalueth="wvalueth" align="center">
      </el-table-column>
      <!-- 无数据 -->
      <template slot="empty">
        <div class="noData">
          <!--  v-show="data.length===0" -->
          <img src="@/assets/images/noData.png" />
          <p>暂无数据</p>
        </div>
      </template>
    </el-table>
    <Pagination :total="total"></Pagination>
    <Dialog
      :title="'新增免疫'"
      :isShowRole="showRole"
      width="815px"
      @closeDialog="closeDialog"
      @confirmDialog="confirmDialog"
    >
      <el-form ref="form" :model="form" label-wvalueth="80px" inline size="mini">
        <el-form-item label="免疫项目">
          <el-input placeholder="请输入免疫项目"></el-input>
        </el-form-item>
        <el-form-item label="免疫对象">
          <el-select v-model="model" placeholder="免疫对象">
            <el-option
              v-for="item in options"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="免疫类型">
          <el-select v-model="model" placeholder="类型">
            <el-option label="label" value="value"></el-option>
          </el-select>
          <!-- <el-input placeholder=""></el-input> -->
        </el-form-item>
        <el-form-item label="提前提醒">
          <el-input v-model="model"></el-input>
        </el-form-item>
      </el-form>
      <DialogTbale title="疫苗明细" :tableData="tableData"/>
    </Dialog>
  </div>
</template>

<script>
import DialogTbale from "./components/DialogTbale";
export default {
  components: { DialogTbale },
  data() {
    return {
      total:100,
      showRole: false,
      tableData:[], //列表数据
      formData:{
        project:''
      }
    };
  },
  methods: {
    add() {
      this.showRole = true;
    },
    //取消对话框
    closeDialog(){ 
      this.showRole = false
      this.tableData = []
    },
    //确定
    confirmDialog(){
      this.showRole = false
      this.tableData = []
    }
  },
};
</script>

<style lang="scss" scoped>

::v-deep .el-form-item__content .el-input__inner{
  width: 150px;
}
// .mingxi{
//   display: flex;
//   justify-content: space-between;
//   i{
//     background: #52A5FF;
//     color: #fff;
//     cursor: pointer;
//   }
// }
</style>
